package org.idea.qiyu.framework.apm.agent.collector.service;

import org.idea.qiyu.common.dto.AgentCollectorDataDTO;
import org.idea.qiyu.framework.apm.agent.collector.dao.IAgentCollectorDao;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Map;

/**
 * agent服务采集service
 *
 * @Author linhao
 * @Date created in 7:08 下午 2021/9/9
 */
@Service
public class AgentCollectorServiceImpl implements IAgentCollectorService{

    @Resource
    private IAgentCollectorDao iAgentCollectorDao;

    @Override
    public boolean reportData(AgentCollectorDataDTO agentCollectorDataDTO) {
        iAgentCollectorDao.insertCollectorData(agentCollectorDataDTO);
        return true;
    }

    @Override
    public Map<String, Object> getAllData() {
        return iAgentCollectorDao.getAllData();
    }


}
